
let mydate = (val) => {
    let mydate = new Date(val);
    let y = mydate.getFullYear();
    let m = (mydate.getMonth() + 1).toString().padStart(2, '0');
    let d = (mydate.getDate()).toString().padStart(2, '0');
    let h = (mydate.getHours()).toString().padStart(2, '0');
    let i = (mydate.getMinutes()).toString().padStart(2, '0');
    let s = (mydate.getSeconds()).toString().padStart(2, '0');
    return `${y}-${m}-${d} ${h}:${i}:${s}`
}

export default mydate;